<?php
session_start();
$host = "localhost";
$user = "root";
$pass = "";
$db ="eeg";
$koneksi = mysql_connect($host, $user, $pass);
if (!$koneksi) {
echo "Koneksi ke server tidak berhasil";
};
$database = mysql_select_db($db);
if (!$database) {
echo "Koneksi ke database tidak berhasil";
}
mysql_select_db($db) or die ("Database not Found !");
?>
<HTML>
<CENTER><div id="container">
	<div id="content">
		<div class="col2">
		<head> 
<meta charset="utf-8"> 
<title>Database Aritmatika</title> 
<meta name="description" content="Database Aritmatika">

</head>
<body>

<?php 
$carisesi= 'ilhamhari10' ;
$sql = "SELECT COUNT(Sesi) FROM mct where Sesi='$carisesi'"; 
$rs_result = mysql_query($sql); 
$row = mysql_fetch_row($rs_result); 
$total_records = $row[0]; 




?>


<?php
echo $carisesi;

?></h1></center>
<table class="table table-striped">
	<thead>
           <tr>
            <th>No</th>
            <th>Hasil</th>
            <th>Sesi</th>
            
			
			
			
          </tr>
        </thead>
<?php




$sql = "SELECT * FROM hasilselish where Sesi='$carisesi'"; 
$rs_result = mysql_query ($sql); 

$query = "SELECT * FROM hasilselish where Sesi='$carisesi'";
$query = mysql_query( $sql );
if(!$query){
    die( mysql_error() );
}

while( $rows = mysql_fetch_row($query) ){
    ?>
    

		<tbody>
          <tr>
		   <td><?php
    echo $rows[0];
    ?></td>
            <td><?php
    echo $rows[1];
    ?></td>
            <td><?php
    echo $rows[2];?>
    </td>
	</tr>
            
            
         
		  
		  
	
  
  
	
<?php
}
?>
 
	 </tbody>
      </table>
</body>
</html>

</div></CENTER>
</div>
</HTML>
<!DOCTYPE html> 
<html lang="en"> 

</body>
</html>